import React, { Component } from "react";

import { Form, Icon, Input, Button } from 'antd';
import Logo from "./images/logo192.png";
import "./index.less";
class Login extends Component {

    handleSubmit = () => {
        console.log(123)
    }
   
    render() {
        console.log(this.props)
        const { getFieldDecorator } = this.props.form;
        return (<div className="login-container">
            <div className="login-header">
                <div className="login-content">
                    <img className="login-logo" src={Logo} alt="login" />
                    <div className="login-title">vvmily系统</div>
                </div>
            </div>
            <div className="login-bodyer">
                <div className="login-form">
                    <h2>欢迎登录vvmily！</h2>
                    <Form onSubmit={this.handleSubmit}>
                        <Form.Item>
                            {getFieldDecorator('username', {
                                rules: [{ required: true, message: 'Please input your username!' }],
                            })(
                                <Input
                                    prefix={<Icon type="user" style={{ color: 'rgba(0,0,0,.25)' }} />}
                                    placeholder="Username"
                                />,
                            )}
                        </Form.Item>
                        <Form.Item>
                            {getFieldDecorator('password', {
                                rules: [{ required: true, message: 'Please input your Password!' }],
                            })(
                                <Input
                                    prefix={<Icon type="lock" style={{ color: 'rgba(0,0,0,.25)' }} />}
                                    type="password"
                                    placeholder="Password"
                                />,
                            )}
                        </Form.Item>
                        <Form.Item>
                            
                            <Button type="primary" htmlType="submit" className="login-form-button">
                                登录
                            </Button>
                      
                        </Form.Item>
                    </Form>
                </div>
            </div>
        </div>)
    }
}

export default Form.create()(Login)
